]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
status/network: Update indicator icon on connectivity changes
authorAntoine Lassagne <antoine.lassagne@canonical.com>
Fri, 10 Oct 2025 12:55:40 +0000 (14:55 +0200)
committerMarge Bot <marge-bot@gnome.org>
Mon, 20 Oct 2025 11:46:29 +0000 (11:46 +0000)
When there is no active main connection or it uses a device type we do
not handle, the indicator icon and its visibility depend on the global
connectivity.

However we currently don't update the icon on connectivity changes,
with the result that we sometimes show the fallback connection icon
when the network is in fact disconnected.

To fix this, update the icon whenever the (global) connectivity changes.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7357
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8549
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3910>

js/ui/status/network.js

index d4903a11c4deb92d34166d559af1237136c9c344..6cf195d4178e85d1bd668824bb11b7b890b2a7eb 100644 (file)
@@ -2199,7 +2199,6 @@ class Indicator extends SystemIndicator {
             this._mainConnectionStateChanged();
         }
 
-        this._updateIcon();
         this._syncConnectivity();
     }
 
@@ -2209,6 +2208,7 @@ class Indicator extends SystemIndicator {
     }
 
     _syncConnectivity() {
+        this._updateIcon();
         if (this._mainConnection == null ||
             this._mainConnection.state !== NM.ActiveConnectionState.ACTIVATED) {
             this._portalHandler.clear();